package com.vastcom.sigma.admin.model;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class Referdata {
    private String referdata;
    private String typeid;
    private String name;
    private Integer px;

    @Id
    @Column(name = "referdata")
    public String getReferdata() {
        return referdata;
    }

    public void setReferdata(String referdata) {
        this.referdata = referdata;
    }

    @Basic
    @Column(name = "typeid")
    public String getTypeid() {
        return typeid;
    }

    public void setTypeid(String typeid) {
        this.typeid = typeid;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "px")
    public Integer getPx() {
        return px;
    }

    public void setPx(Integer px) {
        this.px = px;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Referdata referdata1 = (Referdata) o;

        if (referdata != null ? !referdata.equals(referdata1.referdata) : referdata1.referdata != null) return false;
        if (typeid != null ? !typeid.equals(referdata1.typeid) : referdata1.typeid != null) return false;
        if (name != null ? !name.equals(referdata1.name) : referdata1.name != null) return false;
        if (px != null ? !px.equals(referdata1.px) : referdata1.px != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = referdata != null ? referdata.hashCode() : 0;
        result = 31 * result + (typeid != null ? typeid.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (px != null ? px.hashCode() : 0);
        return result;
    }
}
